﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            string ERR1 = "Invalid operation.";
            string ERR2 = "Zero Division";
            double res;
            Console.WriteLine("Please enter a number:");
            double num1 = Double.Parse(Console.ReadLine());
            Console.WriteLine("Please enter an operator");
            char oper = Console.ReadKey().KeyChar;
            Console.WriteLine("Please enter a number");
            double num2 = Double.Parse(Console.ReadLine());
            if(num2 == 0 && oper == '/')
            {
                Console.WriteLine(ERR2);
                return;
            }
            switch (oper)
            {
                case '+': res = num1 + num2; break;
                case '-': res = num1 - num2; break;
                case '*': res = num1 * num2; break;
                case '/': res = num1 / num2; break;
                default:
                    Console.WriteLine(ERR1);
                    return;
            }
            Console.WriteLine("The result of this operation is: " + res);
            return;

        }
    }
}
